package com.ftg.learn.sys.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ftg.learn.comm.entity.sys.UserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 用户角色中间表 Mapper 接口
 * </p>
 *
 * @author kangjx
 * @since 2022-10-30
 */
@Mapper
public interface UserRoleMapper extends BaseMapper<UserRole> {

    /**
     * 用户角色解冻功能
     * @param id  编号
     */
    @Update("update sys_user_role set is_deleted = 0, gmc_update=now() where u_id = #{id}")
    void unFreezeRoleUserMapper(@Param("id") Integer id);
}
